<template>
  <div class="content"> 
        <ul>
            <li v-for="(item,index) in database" :key="index" @click="takepush(item)">
                <div>
                    <div class="pic">
                        <img :src="item.image || item.pic">
                        <span class="mask"></span>
                    </div>
                    <div class="text">
                        <span>{{item.name || item.title}} </span>
                    </div>
                </div>
             </li>
        </ul>
     </div>
</template>

<script>
export default {
    props:{
        database:{
            type:Array
        }
    },
    methods:{
        takepush(val){
            this.$emit("getSongListinfo",val)
        }
    }
}
</script>

<style scoped lang="less">
*{
    margin: 0;
    padding: 0;
}
ul{
    margin: 0;
    padding: 0;
}
.content ul{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.content ul li{
    position: relative;
    list-style: none;
    width: 220px;
    margin: 10px 30px 20px 30px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.content ul .pic{
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    img{
        width: 100%;
        height: 100%;
    }

}

.content ul .text{
    margin-top: 5px;
    height: 20px;
    overflow: hidden;
    font-size: 15px;
    text-align: center;
    width: 100%;
    text-overflow: ellipsis;
}
.content .mask{
    position: absolute;
    top:50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background:url("@/assets/arr.png") no-repeat center;
    height: 60px;
    width: 60px;
    border-radius: 50%;
    display: none;
}

.content ul li:hover .mask{
    display: block;
    transition: all 0.3s;
}
.content ul li img:hover{
    transition: all 0.3s;
    transform: scale(1.2);
}

</style>